﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<!DOCTYPE html>
<html lang="zh-CN">

	<head>

		<%@ include file="/WEB-INF/include/meta.jsp"%>
		<%@ include file="/WEB-INF/include/css.jsp"%>

	</head>

	<body class="ms-theme-blue">

		<%@ include file="/WEB-INF/include/header.jsp"%>
		<%@ include file="/WEB-INF/include/submenu.jsp"%>

		<div class="container-fluid umu-container has-umu-sidemenu">
			<div class="umu-breadcrumb">
				<div class="breadcrumb">培训讲师管理</div>
			</div>

			<div class="panel-default beast-panel beast-panel-layout">

				<div class="panel-body">

					<div class="col-xs-12 beast-panel-layout-right">

						<div class="ms-content-layout">
							<div class="ms-operation-bar no-margin no-bottom-border clearfix">
								<div class="ms-operation-group pull-right">
									<a href="${ctx.host}/trainers/search" data-toggle="modal" data-target="#search" class="btn btn-shadow-success btn-shadow umu-btn">
										<i class="glyphicon glyphicon-search"></i>&nbsp;&nbsp;过滤查询
									</a>
									<a href="${ctx.host}/trainers/create" class="btn btn-shadow-success btn-shadow umu-btn" data-target="#create" data-toggle="modal">
										<i class="glyphicon glyphicon-plus"></i>&nbsp;&nbsp;新增培训讲师
									</a>
								</div>
							</div><br />

							<table class="table table-hover umu-table tab-pane table-striped">
								<thead>
									<tr>
										<th>讲师姓名</th>
										<th>是否认证</th>
										<th>认证时间</th>
										<th>讲师类型</th>
										<th>讲师级别</th>
										<th>授课时长</th>
										<th>学员满意度</th>
										<th class="text-center">操作</th>
									</tr>
								</thead>

								<tbody>
									<c:forEach items="${trainers}" var="trainer">
										<tr>
											<td>${trainer.name}</td>
											<td>
												<c:choose>
													<c:when test="${ trainer.certified}">是</c:when>
													<c:otherwise>否</c:otherwise>
												</c:choose>
											</td>
											<td>
												<fmt:formatDate value="${trainer.certifiedDate}" pattern="yyyy-MM-dd" />
											</td>
											<td>${trainer.trainerType}</td>
											<td>${trainer.trainerLevel}</td>
											<td>${trainer.trainingHour}</td>
											<td>${trainer.satisfaction}</td>
											<td class="text-center">
												<a href="${ctx.host}/trainers/${trainer.id}/edit" data-target="#edit" data-toggle="modal">修改</a>&nbsp;&nbsp;
												<a href="${ctx.host}/trainers/${trainer.id}/delete" data-target="#delete" data-toggle="modal">删除</a>&nbsp;&nbsp;
											</td>
										</tr>

									</c:forEach>

								</tbody>
								<tfoot>
									<tr>
										<td colspan="8" class="no-vertical-padding">
											<div class="pull-left">
												<jsp:include page="/WEB-INF/include/page.jsp">
													<jsp:param name="url" value="${ctx.host}/trainers" />
													<jsp:param name="queryString" value="${queryString}" />
												</jsp:include>
											</div>
										</td>
									</tr>

								</tfoot>

							</table>
						</div>
					</div>

				</div>

			</div>

		</div>

		<%@ include file="/WEB-INF/include/footer.jsp"%>
		<%@ include file="/WEB-INF/include/script.jsp"%>
		<d:resource root="${ctx.resource}/build" type="script" src="js/page/trainer/trainer-list.js" />
		<script type="text/javascript">
			require(['page/trainer/trainer-list'], function(page) {
				page.init();
			})
		</script>
	</body>

</html>